import request from "@/utils/request";

// 获取列表
export function getAllList(query) {
  return request({
    url: "/houseEconomicDamageAssess/getFailureRatio",
    method: "get",
    params: query,
  });
}

// 查看
export function getEvaluationSubArea(id) {
  return request({
    url: "/houseEconomicDamageAssess/getEvaluationSubArea",
    method: "get",
    params:{
    	xsemId:id
    }
  });
}
// 通过地震事件id获取中高档房屋装修总面积
export function getMhFinishHouseByXsemId(id) {
  return request({
    url: "/houseFinishDamageAssess/getMhFinishHouseByXsemId",
    method: "get",
    params:{
    	xsemId:id
    }
  });
}

export function getMhFinishHouseByXstmId(id, type) {
  return request({
    url: "/houseFinishDamageAssess/middleHighRenovationRatioView",
    method: "get",
    params:{
    	xsemId:id,
    	type
    }
  });
}

// 修改
export function updateMhFinishHouseArea(data) {
  return request({
    url: "/houseFinishDamageAssess/middleHighRenovationRatioSave",
    method: "post",
    data:data
  });
}
// 计算
export function mhFinishHouseCount(data) {
  return request({
    url: "/houseFinishDamageAssess/mhFinishHouseCount",
    method: "post",
    data:data
  });
}